package com.example.mybatis.multdb2;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Component;

/**
 * Project:spring-boot-mybatis-multdb2
 * <p>
 * Title:OneService.java
 * <p>
 * Description:
 * <p>
 * Copyrigth:Jiang Software LTD.co Copyright (c) 2022
 * <p>
 * 
 * @version 1.0
 * @since 1.8
 * @author jiang
 * @history 2022 jiang create
 */
@Component
public class SomeService {

	@Autowired
	JdbcTemplate jdbcTemplate;
	
	@Autowired
	@Qualifier("secondJdbcTemplate")
	JdbcTemplate secondJdbcTemplate;
	
	
	public Map<String,Object> test1() {
		return jdbcTemplate.queryForMap("sql");
	}
	
	public Map<String,Object> test2() {
		return secondJdbcTemplate.queryForMap("sql2");
	}
}
